home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / univspl / form.cpp < prev    next >
C/C++ Source or Header  |  1999-02-02  |  1KB  |  37 lines

  1. //---------------------------------------------------------------------------
  2. #include <vcl\vcl.h>
  3. #pragma hdrstop
  4. #include "fftmain.h"
  5. #include "form.h"
  6. #include "ViewUnit.h"
  7. //---------------------------------------------------------------------------
  8. #pragma resource "*.dfm"
  9. TMainForm *MainForm;
  10. float fftmain(long sample_rate, long fft_size, float freq);
  11.  
  12. //---------------------------------------------------------------------------
  13. __fastcall TMainForm::TMainForm(TComponent* Owner)
  14.     : TForm(Owner)
  15. {
  16. }
  17. //---------------------------------------------------------------------------
  18. void __fastcall TMainForm::ComputeClick(TObject *Sender)
  19. {
  20. float found_freq;
  21.  
  22.    found_freq=fftmain(StrToInt(SRateEdit->Text),StrToInt(FFTSizeEdit->Text),
  23.            StrToFloat(FreqEdit->Text));
  24.    FoundFreqLbl->Caption=FloatToStr(found_freq);
  25.    ViewForm->Invalidate();
  26. }
  27. //---------------------------------------------------------------------------
  28. void __fastcall TMainForm::Button1Click(TObject *Sender)
  29. {
  30.     Application->Terminate();    
  31. }
  32. //---------------------------------------------------------------------------
  33. void __fastcall TMainForm::ViewBtnClick(TObject *Sender)
  34. {
  35.     ViewForm->Show();
  36. }
  37. //---------------------------------------------------------------------------